<template>
  <div class="dish">
    <div class="left"><img :src="d.dishPic" alt="" /></div>
    <div class="right">
      <div class="name1">{{ d.dishName }}</div>
      <div class="price1">
        价格：<span>{{ d.price }}</span
        >元
      </div>
      <van-button size="mini" type="success">购买</van-button>
    </div>
  </div>
</template>

<script lang="ts" setup>
import dish from "@/types/dish";
const props = defineProps(["dish"]);
const d: dish = props.dish;
</script>

<style lang="scss" scoped>
.dish {
  display: flex;
  background-color: rgb(238, 248, 238);
  padding: 10px;
  margin: 10px 8px;
  > .left {
    margin-right: 70px;
    > img {
      width: 120px;
      height: 100px;
    }
  }
  > .right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    > .name1 {
      color: #07c160;
      font-size: 22px;
    }
    > .price1 {
      color: #07c160;
      > span {
        color: red;
        font-size: 22px;
      }
    }
  }
}
</style>